Skip to content

fix(dashboard): update scrollbar contrast on background#62244

Open
kristian-zendato wants to merge 1 commit into
masterfrom
fix/dashboard-scrollbar-color
Open

fix(dashboard): update scrollbar contrast on background#62244
kristian-zendato wants to merge 1 commit into
masterfrom
fix/dashboard-scrollbar-color

Conversation

@kristian-zendato

@kristian-zendato kristian-zendato commented Jul 16, 2026

Copy link
Copy Markdown

Summary

  • Fixes missing contrast between dashboard background and the scrollbar

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Kristian Zendato <kristian.zendato@nextcloud.com>
@kristian-zendato
kristian-zendato requested a review from a team as a code owner July 16, 2026 14:04
@kristian-zendato
kristian-zendato requested review from nfebe, skjnldsv and sorbaugh and removed request for a team July 16, 2026 14:04
@joshtrichards joshtrichards changed the title fix(themeing): update scrollbar contrast on background fix(dashboard): update scrollbar contrast on background Jul 16, 2026
#content {
overflow: auto;
/* Scrollbar sits on the background image — use plain-text color for contrast */
scrollbar-color: var(--color-background-plain-text) transparent;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is versatile enough for all possible backgrounds: e.g. high-contrast themes, custom background images, or maintaining contrast along the entire scrollbar edge of an arbitrary image. Part of the approach used for the dashboard #header might be applicable/re-usable.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshtrichards Thank you for the comment.
Dashboard Header always uses --color-background-plain-text which I used for the scrollbar.
Also I tried with different scenarios, custom background images and colors and high-contrast themes, it works as expected.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is versatile enough for all possible backgrounds: e.g. high-contrast themes, custom background images, or maintaining contrast along the entire scrollbar edge of an arbitrary image. Part of the approach used for the dashboard #header might be applicable/re-usable.

It is, that color is calculated from the background image to have the maximum contrast (its the icons color).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, got it - that makes sense. Reusing the header foreground color is probably the best approach here. Trying to derive a separate color specifically for a vertical scrollbar would get messy, and maintaining contrast along the entire scrollbar edge of an arbitrary image is out of scope. This seems good enough to me.

@susnux

susnux commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

(tested and works as expected)

@susnux susnux added this to the Nextcloud 35 milestone Jul 17, 2026
@susnux

susnux commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

/backport to stable34

@susnux

susnux commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

/backport to stable33

#content {
overflow: auto;
/* Scrollbar sits on the background image — use plain-text color for contrast */
scrollbar-color: var(--color-background-plain-text) transparent;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, got it - that makes sense. Reusing the header foreground color is probably the best approach here. Trying to derive a separate color specifically for a vertical scrollbar would get messy, and maintaining contrast along the entire scrollbar edge of an arbitrary image is out of scope. This seems good enough to me.

@joshtrichards joshtrichards added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dashboard] missing contrast of background to scrollbar

3 participants